<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>添加商品</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
    <h2 class="mb-4">添加商品</h2>
    <form action="product?method=add" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label for="pname">商品名称:</label>
            <input type="text" class="form-control" id="pname" name="pname" required>
        </div>
        <div class="form-group">
            <label for="pprice">价格:</label>
            <input type="text" class="form-control" id="pprice" name="pprice" required>
        </div>
        <div class="form-group">
            <label for="pinfo">商品描述:</label>
            <textarea class="form-control" id="pinfo" name="pinfo" rows="3"></textarea>
        </div>
        <div class="form-group">
            <label for="ptype">商品类型:</label>
            <select class="form-control" id="ptype" name="ptype" required>
                <option value="1">宠物</option>
                <option value="2">玩具</option>
                <option value="3">狗粮</option>
                <option value="4">猫粮</option>
            </select>
        </div>
        <div class="form-group">
            <label for="pimage">商品图片:</label>
            <input type="file" class="form-control-file" id="pimage" name="pimage" required>
        </div>
        <!-- 添加的上传时间选择功能 -->
        <div class="form-group">
            <label for="ptime">上传时间:</label>
            <input type="date" class="form-control" id="ptime" name="ptime" required>
        </div>
        <button type="submit" class="btn btn-primary">提交</button>
    </form>
</div>
</body>
</html>